import { BoolValGetterType, BoolValSetterType } from '../../bool'

export const TraverseDeepOptions_Name = 'TraverseDeepOptions'

export type TraverseDeepOptions = {
  undefinedHandler?: (item: undefined, key: string | number, setStop: BoolValSetterType) => void
  nullHandler?: (item: null, key: string | number, setStop: BoolValSetterType) => void
  funHandler?: (item: Function, key: string | number, setStop: BoolValSetterType) => void
  excludeObjProps?: string[]
  includeObjProps?: string[]
  objPreHandler?: (
    item: Record<string, any>,
    key: string | number,
    parent: any[] | Record<string, any>,
    setStop: BoolValSetterType
  ) => void
  excludeArrItemHandler?: (item: any) => boolean
  arrPreHandler?: (
    item: any[],
    key: string | number,
    parent: any[] | Record<string, any>,
    setStop: BoolValSetterType
  ) => void
  otherHandler?: (item: any, key: string | number, setStop: BoolValSetterType) => void
}

export const TraverseDeepRecursionOptionsType_Name = 'TraverseDeepRecursionOptionsType'

export type TraverseDeepRecursionOptionsType = TraverseDeepOptions & {
  getStop: BoolValGetterType
  setStop: BoolValSetterType
}
